{extend name="$_tpl_public_layout_ace"/}


{block name="breadcrumb"}
<ul class="breadcrumb">
	<li><i class="fa fa-home home-icon"></i><a href="{:url('manage/index/index')}">{:config('web_site_title')}</a></li>
	<li><a href="{:url('seatsel/manage/index')}">{:config('proj_name')}</a></li>
	<li><a href="{:url('seatsel_manage/product/index')}">演出管理</a></li>
	<li><a href="{:url('seatsel_manage/spec/index', ['pid'=>$pid])}">{$sideName}</a></li>
</ul>
{/block}


{block name="pageheader"}
<h1>
	{$sideName}
</h1>
{/block}


{block name="content"}
<!-- 搜索框 -->
<form method="get" action="{:url('seatsel_manage/seat/index')}" class="form-inline mb20 J_ajaxForm">
	<input type="hidden" name="specId" value="{$specId}" />
	
	<div class="mb10">
		<div class="form-group">
			<label>状态：</label>
			<select name="status" class="form-control">
				<option value="0">全部</option>
				{volist name="seat_status_config" id="vo"}
					<?php
						$selected = $status == $key ? 'selected' : '';
					?>
					<option value="{$key}" {$selected}>{$vo}</option>
				{/volist}
			</select>
		</div>
		<div class="form-group">
			<label>ID：</label>
			<input type="text" name="id" value="{$id}" class="form-control zz-length2" />
		</div>
	</div>
	<div class="mb10">
		<div class="form-group">
			<label>x：</label>
			<input type="text" name="x" value="{$x}" class="form-control zz-length3" />
		</div>
		<div class="form-group">
			<label>y：</label>
			<input type="text" name="y" value="{$y}" class="form-control zz-length3" />
		</div>
		<div class="form-group">
			<label>区：</label>
			<input type="text" name="region_name" value="{$region_name}" class="form-control zz-length3" />
		</div>
		<div class="form-group">
			<label>排：</label>
			<input type="text" name="pai" value="{$pai}" class="form-control zz-length3" />
		</div>
		<div class="form-group">
			<label>座：</label>
			<input type="text" name="zuo" value="{$zuo}" class="form-control zz-length3" />
		</div>
	</div>
	<button type="submit" data-action="{:url('seatsel_manage/seat/index')}" class="btn btn-success btn-sm J_excel">搜索</button>
</form>
<hr>
<!-- 搜索框 -->

<div class="callout callout-danger">
	座位总数：{$count}
</div>

<?php
${'active_'.$status} = 'active';
?>
<ul id="inbox-tabs" class="inbox-tabs nav nav-tabs padding-16 tab-size-bigger tab-space-1 mb20">
	<li class="{$active_0}">
		<a href="{:url('seatsel_manage/seat/index', array('specId'=>$specId, 'status'=>0))}">全部</a>
	</li>
	{volist name="seat_status_config" id="vo"}
		<?php
			$actived = $status == $key ? 'active' : '';
		?>
		<li class="{$actived}">
			<a href="{:url('seatsel_manage/seat/index', array('specId'=>$specId, 'status'=>$key))}">{$vo}</a>
		</li>
	{/volist}
</ul>

<form method="post" action="{:url('seatsel_manage/seat/listorders')}" class="form-horizontal J_ajaxForm">
	<table class="table table-striped table-bordered table-hover dataTables-table">
		<thead>
			<tr>
				<th width="80">ID</th>
				<th>x</th>
				<th>y</th>
				<th>名称</th>
				<th>排</th>
				<th>座</th>
				<th width="120">状态</th>
				<th width="120">支付状态</th>
				<th width="180">操作</th>
			</tr>
		</thead>
		<tbody>
			{volist name="list" id="vo"}
			<tr>
				<td>{$vo['id']}</td>
				<td>{$vo['x']}</td>
				<td>{$vo['y']}</td>
				<td>{$vo['region_name']}</td>
				<td>{$vo['pai']}</td>
				<td>{$vo['zuo']}</td>
				<td>{$vo['status_show']}</td>
				<td>{$vo['pay_status_show']}</td>
				<td>
					<a href="{:url('seatsel_manage/seat/setStatus', ['pid'=>$pid, 'specId'=>$specId, 'id'=>$vo['id'], 'flag'=>1])}" class="btn btn-primary btn-xs J_layerConfirm" data-tip="确认设置待售吗？">设置待售</a>
					<a href="{:url('seatsel_manage/seat/setStatus', ['pid'=>$pid, 'specId'=>$specId, 'id'=>$vo['id'], 'flag'=>2])}" class="btn btn-danger btn-xs J_layerConfirm" data-tip="确认设置已售吗？">设置已售</a>
				</td>
			</tr>
			{/volist}
		</tbody>
	</table>
</form>
{$pageShow}
{/block}